<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        background: #999;
      }
      .box{
        margin: 40px;
        padding: 20px;
        width: 100px;
        height: 100px;
        background: deepskyblue;
        border-radius: 50%;
        /* 投影不会影响布局，也不会受box-sizing的影响
          可以通过外边距或内边距模拟出边框需要占据的空间的
          默认的外部投影并不能相应鼠标事件，可以加上inset把投影控制在元素的内圈 */
        box-shadow: inset 0 0 0 20px rgba(255,255,255,.3),
                   0 0 0 20px rgba(255,255,255,.3),
                   0 0 0 40px rgba(255,255,255,.3);
      }
      .outline{
        margin: 20px;
        width: 200px;
        height: 100px;
        background: yellowgreen;
        border: 2px dashed #fff;
        border-radius: 10px;
        outline: 20px solid yellowgreen;
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
    <div class="box"></div>
    <div class="outline"></div>
  </body>
</html>
